home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_13_05 / saks / tree2.h < prev   
C/C++ Source or Header  |  1995-03-06  |  292b  |  19 lines

  1. Listing 2 - A "typical" class for a binary tree with the tree
  2. node class as a forward-declared private nested type
  3.  
  4. class tree
  5.     {
  6. public:
  7.     tree();
  8.     ...
  9. private:
  10.     struct node;
  11.     node *root;
  12.     };
  13.  
  14. struct tree::node
  15.     {
  16.     node *left, *right;
  17.     ...
  18.     };
  19.